<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/


Route::get('/v1/account/login', 'Api\V1\AccountController@login');

Route::get('/v1/account/code', 'Api\V1\AccountController@getCode');
Route::get('/v1/account/mcode', 'Api\V1\AccountController@imageCode');
Route::get('/v1/account/openId', 'Api\V1\AccountController@openId')->name('account.openId');
Route::get('/v1/account/wechatOauth', 'Api\V1\AccountController@wechatOauth')->name('account.wechatOauth');
Route::post('/v1/feedback', 'Api\V1\FeedbackController@add');


Route::get('/v1/product', 'Api\V1\ProductController@index');
Route::get('/v1/product/detail', 'Api\V1\ProductController@detail');
Route::post('/v1/order/create', 'Api\V1\OrderController@create');

Route::any('/v1/order/make', 'Api\V1\OrderController@make');
Route::any('/v1/order/makeAppWx', 'Api\V1\OrderController@makeWxApp');
Route::any('/v1/order/makeAppAlipay', 'Api\V1\OrderController@makeAppAlipay');

Route::any('/v1/my/product', 'Api\V1\MyController@product');
Route::get('/v1/my/product/detail', 'Api\V1\MyController@productDetail');
Route::any('/v1/my/share', 'Api\V1\MyController@share');
Route::any('/v1/my/apply', 'Api\V1\MyController@apply');

Route::any('/v1/page/about', 'Api\V1\PageController@about');

